<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" type="text/css"
          href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css"/>
    <link rel="stylesheet" type="text/css"
          href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/tundra/tundra.css"/>


    <script type="text/javascript">
        var isBuild = false;
        djConfig = {ioPublish: true, isDebug: false, debugAtAllCosts: true, parseOnLoad: true, locale: 'en', packages: [
            {name: "imagediscovery", location: location.pathname.replace(/[^/]+$/, '') + "../js/" + (isBuild ? "build/" : "") + "imagediscovery"},
            {name: "esri", location: "http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri"}

        ]};
    </script>


</head>
<body class="tundra">
<div style="margin-top: 25px">
    <div id="map" style="height: 600px"></div>
</div>
<div style="margin-top: 25px">
    <table style="width: 100%" border="1">
        <thead>
        <tr id="tableHeaderRow"></tr>
        </thead>
        <tbody id="tableBody">

        </tbody>
    </table>

</div>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.3/dojo/dojo.js"></script>
<script type="text/javascript">
    require(["dojo/domReady!", "esri/config", "imagediscovery/reporting/base/HtmlReport"], function (domReady, config, HtmlReport) {
        if (window.opener._reportingWidgetParameters == null) {
            return;
        }
        var mapParameters = window.opener._reportingWidgetParameters.mapParameters;
        var tableParameters = window.opener._reportingWidgetParameters.tableParameters;
        window.opener._reportingWidgetParameters = null;
        var reportClassObj = new HtmlReport({mapDivId: "map", tableHeaderRowId: "tableHeaderRow" , tableBodyId: "tableBody", mapParameters: mapParameters, tableParameters: tableParameters});
        config.defaults.io.proxyUrl = "proxy/proxy.ashx";
    });


</script>
</body>
</html>
